<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0022)http://blog.csdn.net/electroniXtar/ -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>客户端接口规范</title>
<style>
BODY {
    MARGIN: 2em 2em 2em 2em; FONT-FAMILY: 宋体, helvetica, sans-serif; COLOR: black; 
}
h1,h2,h3,h4 {
    FONT-FAMILY: 黑体, helvetica, sans-serif; COLOR: black
}
pre {
    background : #ccc;
    width:90%;
    word-wrap:break-word;  
}
table {
    table-layout: fixed;
    border-collapse:collapse;
    border: 2px solid black;
    width :90%
}
td{
    table-layout: fixed;
    border-collapse:collapse;
    border: 2px solid black;
    white-space:pre-wrap;
    white-space:-moz-pre-wrap;
    white-space:-pre-wrap;
    white-space:-o-pre-wrap;
    word-wrap:break-word;    
}
th {
    background-color:#ccccff;
    border: 1px solid black;
}
th.name {
    width:12em
}
th.parent {
    width:12em
}
th.occur {
    width:5em
}
th.type {
    width:12em
}
th.resultcode {
    width:12em
}

td {
    border: 1px solid black;
}

.tr1 {
    background-color:#fff;
}
.tr2 {
    background-color:#dfd;
}
.tr3 {
    background-color:#ddd;
}
.tr4 {
    background-color:#bff;
}
.tr5 {
    background-color:#bf0;
}
.tr6 {
    background-color:#f80;
}
.tr7 {
    background-color:#ff0;
}
.tr8 {
    background-color:#880;
}
.tr9 {
    background-color:#f00;
}
::selection {background-color:#669900; color:#000000;}
.smallfont{font-family: 幼圆; font-size:small; COLOR: black}
</style>
<script language = "JavaScript">
var bV=parseInt(navigator.appVersion);//返回浏览器的平台和版本信息
var uA=navigator.userAgent.toLowerCase();//用户代理小写
var IE=false;	
 if (uA.indexOf("msie") != -1)
   IE=(bV>=4)?true:false;
function expandIE(el) { 
    var nstdImg = event.srcElement;
    if (el.style.display == "block") {
        el.style.display = "none";
        nstdImg.innerText="田 ";
    }
    else {
        el.style.display = "block";
        nstdImg.innerText="曰 ";
    }
} 
var theobject = null;
var drag = false;
var bemoved = false;
function resizeObject(){
    this.el1 = null;
    this.el2 = null;
    this.dir = "";
    this.grabx = null;
    this.graby = null;
    this.width = null;
    this.left = null;
}
function getReal(el, type, value)
{
	var temp = el;
	while ((temp != null) && (temp.tagName != "BODY")) {
		if (eval("temp." + type) == value) {
			el = temp;
			return el;
		}
		temp = temp.parentElement;
	}
	return el;
}

function getDirection(el)
{
	var xPos, yPos, offset, dir;
	dir = "";
	
	xPos = window.event.offsetX;
	yPos = window.event.offsetY;
	if (0 <= xPos && xPos <= el.offsetWidth)
	{
		dir += "e";
	}
	return dir;
}

function doUp() {
	if (theobject != null) {
	document.getElementById("sepreate").style.zIndex = "1";
        if (theobject.dir.indexOf("e") != -1){
            
            if (drag && bemoved)
            {
                theobject.el1.style.width =  parseInt(document.getElementById("sepreate").style.left) - theobject.left + "px";  
                theobject.el2.style.left =   parseInt(document.getElementById("sepreate").style.left) + window.screen.width * 2 /100 + "px";
                bemoved = false;     
            }
            else if (bemoved)
            {                   
                theobject.el1.style.width = window.screen.width * parseInt(document.getElementById("sepreate").style.left)/100 - theobject.left + "px";  
                theobject.el2.style.left =  window.screen.width * parseInt(document.getElementById("sepreate").style.left)/100 + window.screen.width * 2 /100 + "px"; 
            } 
            else
            {
            }                    
            drag = false;
        }
		theobject = null;
	}
}

function doDown() {
	var el1 = document.getElementById("directory");
	var el2 = document.getElementById("errorcode");
	document.getElementById("sepreate").style.zIndex = "2";	
	if (el1 == null || el2 == null)
	{
		theobject = null;
		return;
	}
	var dir = getDirection(document.getElementById("sepreate"));
	
	if (dir == "")
	{
		return;
	}
	else if (dir == "e")
	{	
	    if (event.srcElement.id == "sepreate")
		{
			drag = true;
		}
	}
	else
	{
		return;
	}
	
	theobject = new resizeObject();
	
	theobject.el1 = el1;
	theobject.el2 = el2;
	theobject.dir = dir;
	theobject.grabx = window.event.clientX;
	theobject.graby = window.event.clientY;
	theobject.width = el1.offsetWidth;
	theobject.left = el1.offsetLeft;

	window.event.returnValue = false;
	window.event.cancleBubble = true;
}

function doMove() {
	var el, Pos, yPos, str, xMin, yMin;
	
	el = getReal(event.srcElement, "id", "sepreate");
	
	if (drag)
    {   	
    	document.getElementById("sepreate").style.left = window.event.clientX+2+"px";
    	bemoved = true;
    }
    if (el.id == "sepreate")
    {
        str = getDirection(el);
        if (str == "")
        {
            str = "default";
        }
        else
        {
            str += "-resize";
        }
        el.style.cursor = str;
    }    
}
document.onmousemove = doMove;
document.onmouseup = doUp;
document.onmousedown = doDown;
</script>
</head>

<body onselectstart="return true;">
<div id = "directory" style = "background-color: buttonface; background-repeat: repeat; background-attachment: scroll; color: #3969A5;position:absolute;
top:0;left:3%;overflow:scroll;width:20%;height:100%;">
<h2>目录</h2>
<dl>
${dir_groups}
</dl>
</div>
<div id = "sepreate" style = "position:absolute;top:0;left:23%;width:0px;height:100%;border-right:2px solid #BC8FBD;border-left:2px solid #BC8FBD;">
</div>
<div id = "errorcode" style = "position:absolute;top:0;_top:0;right:0;bottom:0;left:25%;overflow:auto;height:100%;padding-left:10px;" >
<h1 style="text-align:center">客户端接口规范</h1>
<h3 id="getIpInfoList1.1">1.1 getIpInfoList 获取IP信息列表</h3>
<h4 id="getIpInfoList_desc1.1">1.1.1 接口描述</h4>
<div style = "width:90%;word-wrap:break-word;white-space:normal;">获取黑名单或者白名单的信息列表</div>
<h4 id="getIpInfoList_define1.1">1.1.2 消息体定义</h4>
请求方式
<pre>POST</pre>
请求消息体
<table>
    <tr>
        <th class="name">字段名</th>
        <th class="parent">父字段名</th>
        <th class="type">字段类型</th>
        <th class="occur">出现次数</th>
        <th>描述</th>
    </tr>
	<tr class="tr1">
        <td>ipType</td>
        <td>Request</td>
        <td>String</td>
        <td>1</td>
        <td>IPl类型 0是白名单 1是黑名单</td>
    </tr>

</table>
</br>
响应消息体
<table>
    <tr>
        <th class="name">字段名</th>
        <th class="parent">父字段名</th>
        <th class="type">字段类型</th>
        <th class="occur">出现次数</th>
        <th>描述</th>
    </tr>
	<tr class="tr1">
        <td>ipInfoList</td>
        <td>Response</td>
        <td>List</td>
        <td>0..N</td>
        <td>IP信息</td>
    </tr>
	<tr class="tr2">
        <td>IpInfo</td>
        <td>ipInfoList</td>
        <td>IpInfo</td>
        <td>0..N</td>
        <td>IP信息</td>
    </tr>
	<tr class="tr3">
        <td>ipAddress</td>
        <td>IpInfo</td>
        <td>String</td>
        <td>1</td>
        <td>IP地址</td>
    </tr>
	<tr class="tr3">
        <td>type</td>
        <td>IpInfo</td>
        <td>String</td>
        <td>1</td>
        <td>IP地址</td>
    </tr>
	<tr class="tr3">
        <td>startTime</td>
        <td>IpInfo</td>
        <td>Date</td>
        <td>1</td>
        <td>开始时间</td>
    </tr>
	<tr class="tr3">
        <td>endTime</td>
        <td>IpInfo</td>
        <td>Date</td>
        <td>1</td>
        <td>结束时间</td>
    </tr>
	<tr class="tr3">
        <td>visitCount</td>
        <td>IpInfo</td>
        <td>LONG</td>
        <td>1</td>
        <td>访问次数</td>
    </tr>
	<tr class="tr3">
        <td>remark</td>
        <td>IpInfo</td>
        <td>String</td>
        <td>0.....1</td>
        <td>备注</td>
    </tr>

</table>
<h4 id="getIpInfoList_example1.1">1.1.3 报文样例</h4>
请求方法
<pre>
POST /portalengine/getIpInfoList
</pre>
例子
<pre>
&lt;Request&gt;
    &lt;ipType&gt;1&lt;/ipType&gt;
&lt;/Request&gt;
  
gzip(
    127.0.0.1|0|2012-08-14 00:00:00.0|2012-08-16 00:00:00.0|32|123123
    127.0.0.1|0|2012-08-14 00:00:00.0|2012-08-16 00:00:00.0|32|123123
)
</pre>

<h4 id="getIpInfoList_resultcode1.1">1.1.4 接口响应码</h4>
<table>
    <tr>
        <th class="resultcode">响应码</th>
        <th>描述</th>
    </tr>

</table>


<h2 id = "lastgroup">end</h2>
<p style = "width:90%;word-wrap:break-word;white-space:normal;">
</p>
</div>

</body>
</html>

